import React from 'react';
import dynamic from 'dva/dynamic';
import { Route } from 'dva/router';




export default function sotresRoute(app) {

    const Stores = dynamic({
        app,
        models: () => {
            return [
                import('../models/stores/storesShowModel'),
            ];
        },
        component: () => import('../routes/storesShow/stores'),
    });
    const StoresDetail = dynamic({
        app,
        models: () => {
            return [
                import('../models/stores/storesShowModel'),
            ];
        },
        component: () => import('../routes/storesShow/storesDetail'),
    });
    const StoresSearch= dynamic({
        app,
        models: () => {
            return [
                import('../models/stores/storesShowModel'),
            ];
        },
        component: () => import('../routes/storesShow/storesSearch'),
    });
    const GoSearch= dynamic({
        app,
        models: () => {
            return [
                import('../models/stores/storesShowModel'),
            ];
        },
        component: () => import('../routes/storesShow/GoSearch'),
    });
    const Search= dynamic({
        app,
        models: () => {
            return [
                import('../models/stores/storesShowModel'),
            ];
        },
        component: () => import('../routes/storesShow/GoSearch'),
    });




    return (
        [
            <Route key="/stores" exact strict path="/storesShow/:id" component={Stores}/>,
            <Route key="/stores" exact strict path="/storesDetail/:id" component={StoresDetail}/>,
            <Route key="/stores" exact strict path="/storesSearch/:stcId/:id/:stcName" component={StoresSearch}/>,
            <Route key="/stores" exact strict path="/stores/:storeId" component={GoSearch}/>,
            <Route key="/stores" exact strict path="/storesSearch/:searchType" component={Search}/>,


        ]
    );
}
